#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc,char*argv[])
{
    if(argc < 2)
    {
        printf("参数有误\n");
        return 0;
    }
    FILE *file=fopen(argv[1],"r");
    if(file == NULL)
    {
        printf("error\n");
        return 0;
    }
    fseek(file,18,SEEK_SET);
    int height=0;
    int width=0;
    fread(&height,4,1,file);
    fread(&width,4,1,file);

    printf("高:%d\n宽：%d\n",height,width);
    fclose(file);
    file=NULL;
    return 0;
}